package com.tmt.im.wallet.mapstruct;

import com.tmt.im.common.pojo.RedPackageDetailPoJo;
import com.tmt.im.wallet.controler.vo.ReceivedDetailItem;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/8/25 15:04
 * @Version 1.0
 **/
@Component
@Mapper(componentModel = "spring")
public interface RedPackageDetailMapStruct {

    @Mappings({
            @Mapping(target = "receivedTime", expression = "java(com.tmt.im.wallet.helper.RechargeDetailHelper.getReceivedTime(detailPoJo.getReceivedTime()))"),
    })
    ReceivedDetailItem toRedPackageDetailVo(RedPackageDetailPoJo detailPoJo);

    List<ReceivedDetailItem> toReceivedDetailItems(List<RedPackageDetailPoJo> detailPoJos);

}
